# Contributor: Eloi Torrents <eloitor@disroot.org>
# Maintainer: Eloi Torrents <eloitor@disroot.org>
pkgname=lcalc
pkgver=2.0.5
pkgrel=1
pkgdesc="Michael Rubinstein's L-function calculator"
url="https://gitlab.com/sagemath/lcalc"
# blocked by pari
arch="all !armhf !armv7 !x86"
license="GPL-2.0-or-later"
makedepends="gengetopt gmp-dev pari-dev"
subpackages="$pkgname-dev $pkgname-libs $pkgname-doc"
source="https://gitlab.com/sagemath/lcalc/uploads/25f029f3c02fcb6c3174972e0ac0e192/lcalc-$pkgver.tar.xz"

build() {
	CFLAGS="$CFLAGS -O2 -flto=auto" \
	CXXFLAGS="$CXXFLAGS -O2 -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-pari
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
d3b7fa25dd3c2a8f88671076dfb5ab5e933be7feff24bbd160c92a476953f5553f9fb58f72c36b9c668929385084918fc3396e1a0bcc55de12ea8cb647c53929  lcalc-2.0.5.tar.xz
"
